Optimal. Leaf size=127 \[ \frac {a^2 (c+d x)^2}{2 d}+\frac {2 a b (c+d x) \log \left (1-e^{2 (e+f x)}\right )}{f}-\frac {a b (c+d x)^2}{d}+\frac {a b d \text {Li}_2\left (e^{2 (e+f x)}\right )}{f^2}-\frac {b^2 (c+d x) \coth (e+f x)}{f}+b^2 c x+\frac {b^2 d \log (\sinh (e+f x))}{f^2}+\frac {1}{2} b^2 d x^2 \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.18, antiderivative size = 127, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 7, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.389, Rules used = {3722, 3716, 2190, 2279, 2391, 3720, 3475} \[ \frac {a b d \text {PolyLog}\left (2,e^{2 (e+f x)}\right )}{f^2}+\frac {a^2 (c+d x)^2}{2 d}+\frac {2 a b (c+d x) \log \left (1-e^{2 (e+f x)}\right )}{f}-\frac {a b (c+d x)^2}{d}-\frac {b^2 (c+d x) \coth (e+f x)}{f}+b^2 c x+\frac {b^2 d \log (\sinh (e+f x))}{f^2}+\frac {1}{2} b^2 d x^2 \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2190
Rule 2279
Rule 2391
Rule 3475
Rule 3716
Rule 3720
Rule 3722
Rubi steps
\begin {align*} \int (c+d x) (a+b \coth (e+f x))^2 \, dx &=\int \left (a^2 (c+d x)+2 a b (c+d x) \coth (e+f x)+b^2 (c+d x) \coth ^2(e+f x)\right ) \, dx\\ &=\frac {a^2 (c+d x)^2}{2 d}+(2 a b) \int (c+d x) \coth (e+f x) \, dx+b^2 \int (c+d x) \coth ^2(e+f x) \, dx\\ &=\frac {a^2 (c+d x)^2}{2 d}-\frac {a b (c+d x)^2}{d}-\frac {b^2 (c+d x) \coth (e+f x)}{f}-(4 a b) \int \frac {e^{2 (e+f x)} (c+d x)}{1-e^{2 (e+f x)}} \, dx+b^2 \int (c+d x) \, dx+\frac {\left (b^2 d\right ) \int \coth (e+f x) \, dx}{f}\\ &=b^2 c x+\frac {1}{2} b^2 d x^2+\frac {a^2 (c+d x)^2}{2 d}-\frac {a b (c+d x)^2}{d}-\frac {b^2 (c+d x) \coth (e+f x)}{f}+\frac {2 a b (c+d x) \log \left (1-e^{2 (e+f x)}\right )}{f}+\frac {b^2 d \log (\sinh (e+f x))}{f^2}-\frac {(2 a b d) \int \log \left (1-e^{2 (e+f x)}\right ) \, dx}{f}\\ &=b^2 c x+\frac {1}{2} b^2 d x^2+\frac {a^2 (c+d x)^2}{2 d}-\frac {a b (c+d x)^2}{d}-\frac {b^2 (c+d x) \coth (e+f x)}{f}+\frac {2 a b (c+d x) \log \left (1-e^{2 (e+f x)}\right )}{f}+\frac {b^2 d \log (\sinh (e+f x))}{f^2}-\frac {(a b d) \operatorname {Subst}\left (\int \frac {\log (1-x)}{x} \, dx,x,e^{2 (e+f x)}\right )}{f^2}\\ &=b^2 c x+\frac {1}{2} b^2 d x^2+\frac {a^2 (c+d x)^2}{2 d}-\frac {a b (c+d x)^2}{d}-\frac {b^2 (c+d x) \coth (e+f x)}{f}+\frac {2 a b (c+d x) \log \left (1-e^{2 (e+f x)}\right )}{f}+\frac {b^2 d \log (\sinh (e+f x))}{f^2}+\frac {a b d \text {Li}_2\left (e^{2 (e+f x)}\right )}{f^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 1.98, size = 192, normalized size = 1.51 \[ \frac {\sinh (e+f x) (a+b \coth (e+f x))^2 \left (\sinh (e+f x) \left (-\left ((e+f x) \left (a^2 (-2 c f+d e-d f x)-2 a b d (e+f x)+b^2 (-2 c f+d e-d f x)\right )\right )+2 b \log (\sinh (e+f x)) (2 a c f-2 a d e+b d)+4 a b d (e+f x) \log \left (1-e^{-2 (e+f x)}\right )\right )-2 a b d \text {Li}_2\left (e^{-2 (e+f x)}\right ) \sinh (e+f x)-2 b^2 f (c+d x) \cosh (e+f x)\right )}{2 f^2 (a \sinh (e+f x)+b \cosh (e+f x))^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.44, size = 851, normalized size = 6.70 \[ -\frac {{\left (a^{2} - 2 \, a b + b^{2}\right )} d f^{2} x^{2} + 4 \, a b d e^{2} + 2 \, {\left (a^{2} - 2 \, a b + b^{2}\right )} c f^{2} x - 4 \, b^{2} d e - {\left ({\left (a^{2} - 2 \, a b + b^{2}\right )} d f^{2} x^{2} + 4 \, a b d e^{2} - 8 \, a b c e f - 4 \, b^{2} d e - 2 \, {\left (2 \, b^{2} d f - {\left (a^{2} - 2 \, a b + b^{2}\right )} c f^{2}\right )} x\right )} \cosh \left (f x + e\right )^{2} - 2 \, {\left ({\left (a^{2} - 2 \, a b + b^{2}\right )} d f^{2} x^{2} + 4 \, a b d e^{2} - 8 \, a b c e f - 4 \, b^{2} d e - 2 \, {\left (2 \, b^{2} d f - {\left (a^{2} - 2 \, a b + b^{2}\right )} c f^{2}\right )} x\right )} \cosh \left (f x + e\right ) \sinh \left (f x + e\right ) - {\left ({\left (a^{2} - 2 \, a b + b^{2}\right )} d f^{2} x^{2} + 4 \, a b d e^{2} - 8 \, a b c e f - 4 \, b^{2} d e - 2 \, {\left (2 \, b^{2} d f - {\left (a^{2} - 2 \, a b + b^{2}\right )} c f^{2}\right )} x\right )} \sinh \left (f x + e\right )^{2} - 4 \, {\left (2 \, a b c e - b^{2} c\right )} f - 4 \, {\left (a b d \cosh \left (f x + e\right )^{2} + 2 \, a b d \cosh \left (f x + e\right ) \sinh \left (f x + e\right ) + a b d \sinh \left (f x + e\right )^{2} - a b d\right )} {\rm Li}_2\left (\cosh \left (f x + e\right ) + \sinh \left (f x + e\right )\right ) - 4 \, {\left (a b d \cosh \left (f x + e\right )^{2} + 2 \, a b d \cosh \left (f x + e\right ) \sinh \left (f x + e\right ) + a b d \sinh \left (f x + e\right )^{2} - a b d\right )} {\rm Li}_2\left (-\cosh \left (f x + e\right ) - \sinh \left (f x + e\right )\right ) + 2 \, {\left (2 \, a b d f x + 2 \, a b c f + b^{2} d - {\left (2 \, a b d f x + 2 \, a b c f + b^{2} d\right )} \cosh \left (f x + e\right )^{2} - 2 \, {\left (2 \, a b d f x + 2 \, a b c f + b^{2} d\right )} \cosh \left (f x + e\right ) \sinh \left (f x + e\right ) - {\left (2 \, a b d f x + 2 \, a b c f + b^{2} d\right )} \sinh \left (f x + e\right )^{2}\right )} \log \left (\cosh \left (f x + e\right ) + \sinh \left (f x + e\right ) + 1\right ) - 2 \, {\left (2 \, a b d e - 2 \, a b c f - b^{2} d - {\left (2 \, a b d e - 2 \, a b c f - b^{2} d\right )} \cosh \left (f x + e\right )^{2} - 2 \, {\left (2 \, a b d e - 2 \, a b c f - b^{2} d\right )} \cosh \left (f x + e\right ) \sinh \left (f x + e\right ) - {\left (2 \, a b d e - 2 \, a b c f - b^{2} d\right )} \sinh \left (f x + e\right )^{2}\right )} \log \left (\cosh \left (f x + e\right ) + \sinh \left (f x + e\right ) - 1\right ) + 4 \, {\left (a b d f x + a b d e - {\left (a b d f x + a b d e\right )} \cosh \left (f x + e\right )^{2} - 2 \, {\left (a b d f x + a b d e\right )} \cosh \left (f x + e\right ) \sinh \left (f x + e\right ) - {\left (a b d f x + a b d e\right )} \sinh \left (f x + e\right )^{2}\right )} \log \left (-\cosh \left (f x + e\right ) - \sinh \left (f x + e\right ) + 1\right )}{2 \, {\left (f^{2} \cosh \left (f x + e\right )^{2} + 2 \, f^{2} \cosh \left (f x + e\right ) \sinh \left (f x + e\right ) + f^{2} \sinh \left (f x + e\right )^{2} - f^{2}\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (d x + c\right )} {\left (b \coth \left (f x + e\right ) + a\right )}^{2}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.52, size = 318, normalized size = 2.50 \[ \frac {a^{2} d \,x^{2}}{2}-a b d \,x^{2}+\frac {b^{2} d \,x^{2}}{2}+a^{2} c x +2 c a b x +b^{2} c x -\frac {2 b^{2} \left (d x +c \right )}{f \left ({\mathrm e}^{2 f x +2 e}-1\right )}-\frac {2 b^{2} d \ln \left ({\mathrm e}^{f x +e}\right )}{f^{2}}+\frac {b^{2} d \ln \left ({\mathrm e}^{f x +e}-1\right )}{f^{2}}+\frac {b^{2} d \ln \left ({\mathrm e}^{f x +e}+1\right )}{f^{2}}+\frac {2 b a c \ln \left ({\mathrm e}^{f x +e}+1\right )}{f}-\frac {4 b a c \ln \left ({\mathrm e}^{f x +e}\right )}{f}+\frac {2 b a c \ln \left ({\mathrm e}^{f x +e}-1\right )}{f}+\frac {4 b d a e \ln \left ({\mathrm e}^{f x +e}\right )}{f^{2}}-\frac {2 b d a e \ln \left ({\mathrm e}^{f x +e}-1\right )}{f^{2}}+\frac {2 b \ln \left (1-{\mathrm e}^{f x +e}\right ) a d x}{f}+\frac {2 b \ln \left (1-{\mathrm e}^{f x +e}\right ) a d e}{f^{2}}+\frac {2 b \ln \left ({\mathrm e}^{f x +e}+1\right ) a d x}{f}-\frac {4 b a d e x}{f}-\frac {2 b a d \,e^{2}}{f^{2}}+\frac {2 b d a \polylog \left (2, -{\mathrm e}^{f x +e}\right )}{f^{2}}+\frac {2 b d a \polylog \left (2, {\mathrm e}^{f x +e}\right )}{f^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.50, size = 244, normalized size = 1.92 \[ \frac {1}{2} \, a^{2} d x^{2} - 2 \, a b d x^{2} + a^{2} c x - \frac {2 \, b^{2} d x}{f} + \frac {2 \, a b c \log \left (\sinh \left (f x + e\right )\right )}{f} + \frac {2 \, {\left (f x \log \left (e^{\left (f x + e\right )} + 1\right ) + {\rm Li}_2\left (-e^{\left (f x + e\right )}\right )\right )} a b d}{f^{2}} + \frac {2 \, {\left (f x \log \left (-e^{\left (f x + e\right )} + 1\right ) + {\rm Li}_2\left (e^{\left (f x + e\right )}\right )\right )} a b d}{f^{2}} + \frac {b^{2} d \log \left (e^{\left (f x + e\right )} + 1\right )}{f^{2}} + \frac {b^{2} d \log \left (e^{\left (f x + e\right )} - 1\right )}{f^{2}} - \frac {2 \, {\left (c f + 2 \, d\right )} b^{2} x + 4 \, b^{2} c + {\left (2 \, a b d f + b^{2} d f\right )} x^{2} - {\left (2 \, b^{2} c f x e^{\left (2 \, e\right )} + {\left (2 \, a b d f e^{\left (2 \, e\right )} + b^{2} d f e^{\left (2 \, e\right )}\right )} x^{2}\right )} e^{\left (2 \, f x\right )}}{2 \, {\left (f e^{\left (2 \, f x + 2 \, e\right )} - f\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int {\left (a+b\,\mathrm {coth}\left (e+f\,x\right )\right )}^2\,\left (c+d\,x\right ) \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a + b \coth {\left (e + f x \right )}\right )^{2} \left (c + d x\right )\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________